#include "PLCControl.h"
#include "ui_PLCControl.h"

PLCControl::PLCControl(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::PLCControl)
{
    ui->setupUi(this);
    this->setWindowTitle("PLC调试");
}

PLCControl::~PLCControl()
{
    delete ui;
}

void PLCControl::on_pb_CleanT_clicked()
{
    PLCHelper::GetInstance()->CloseAirValve();
}

void PLCControl::on_pb_SensorBack_clicked()
{
    // PLCHelper::GetInstance()->
}

void PLCControl::on_pb_SensorOut_clicked()
{

}

void PLCControl::on_pb_laserOpen_clicked()
{

}

void PLCControl::on_pb_laserClose_clicked()
{

}

void PLCControl::on_pb_AirOpen_clicked()
{
    PLCHelper::GetInstance()->OpenAirValve();
}

void PLCControl::on_pb_AirClose_clicked()
{
    PLCHelper::GetInstance()->CloseAirValve();
}
